package movee.api.doc;

import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import io.swagger.v3.oas.models.info.Info;
import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 *
 *
 * @author yangshengbing@baidu.com
 */
@Configuration
@EnableKnife4j
public class Knife4jConfig {

    @Bean
    public GroupedOpenApi oasConfig(){
        return GroupedOpenApi.builder()
                .group("spring-project-framework-v1")
                .addOpenApiCustomizer(api -> api.info(new Info()
                        .title("spring-project-framework")
                        .description("spring项目骨架")
                        .version("v1")))
                .packagesToScan("movee.api.v1")
                .build();
    }
}
